
Steps to build tm_module_1_4_4.zip on RedHat Enterprise Linux 5 / CentOS 5

1. Make sure the following packages are installed (and their dependencies):
   gcc-c++
   httpd-devel
   apr-devel

   For example with "yum install <pkgnames>"

2. unzip tm_module_1_4_4.zip then cd into the tm_module_1_4_4 directory
   and copy the mac_project directory to lnx_project:

   cp -a mac_project lnx_project

3. cd into the lnx_project directory and edit the makefile, making the
   following changes:

STDC_FLAGS = -fPIC -fpermissive -DEAPI -Dismac -Dordermsb -DOMSRV_MPF -Disapache2 -DDW_UNIX -D_WINDOWS -Dmsvcnt -w -I/usr/include/httpd -I/usr/include/apr-1 -lapr-1

LINK_FLAGS = -flat-namespace -undefined -shared -o

LINK_LIBS = -lapr-1

4. run make

5. in the release subdirectory there should be a mod_tm.so file, copy
   that to /etc/httpd/modules, which is a symbolic link to the correct
   library directory for your architecture.  (/usr/lib/httpd or
   /usr/lib64/httpd)  Fix the ownership and permissions on the file:

	chown root.root /etc/httpd/modules/mod_tm.so
        chmod 755 /etc/httpd/modules/mod_tm.so

6. The mod_tm module needs a "data" directory in ServerRoot, on RedHat
   this is in /etc/httpd.  As you don't normally want to write data into
   /etc the RedHat way of dealing with this would be to create an
   /etc/httpd/data symlink pointing to somewhere more appropriate,
   /var/www/data, for example.  So mkdir the "data" directory, set
   permissions, owner apache:apache and mode 750, and then create a
   symlink in /etc/httpd pointing there.

7. The normal RedHat way of accomodating module configuration needs is
   not to edit the main httpd.conf file directly but to drop a module-
   specific config file in /etc/httpd/conf.d, so put the included
   tm.conf file there.  Permissions should be root:root, mode 644.
   You may also want to disable other module config files if they
   may interfere with TM - any file ending  in ".conf" in that directory
   will be included in the apache configuration - so simply renaming a
   config file something.conf to something.conf.bak is enough to stop it
   being included.  (Better yet remove unnecessary modules from the system
   using rpm or yum.)

8. RedHat puts web pages in /var/www/html (so the content of the htdocs
   directory goes there.)

9. If using SELINUX (enabled by default on recent RedHat and CentOS installs)
   you must change the contect of the mod_tm.so and tm.conf files as follows:

	chcon system_u:object_r:httpd_config_t:s0 /etc/httpd/conf.d/tm.conf
	chcon system_u:object_r:httpd_modules_t:s0 /etc/httpd/modules/mod_tm.so
